package io.adrainty.bolee.security.models.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.adrainty.bolee.framework.commons.basic.BaseEntity;
import io.adrainty.bolee.framework.commons.basic.EnableEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.io.Serial;

/**
 * <p>DeptEntity</p>
 *
 * @author AdRainty
 * @version V1.0.0
 * @description DeptEntity
 * @since 2025/8/7 13:51:06
 */

@Data
@Schema(description = "部门信息")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class DeptEntity extends BaseEntity {
    
    @Serial
    private static final long serialVersionUID = 3435471245564706440L;

    @Schema(description = "父部门编号")
    private String parentDeptNo;

    @Schema(description = "部门编号")
    private String deptNo;

    @Schema(description = "部门名称")
    private String deptName;

    @Schema(description = "排序")
    private Integer sortNo;

    @Schema(description = "负责人Id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long leaderId;

    @Schema(description = "TREE结构：选中部门No")
    private String[] checkedDeptNos;

    @Schema(description = "角色查询部门：部门对应角色id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long roleId;

    @Schema(description = "部门No")
    private String companyNo;

    @Schema(description = "数据状态：0正常 1禁用")
    private EnableEnum dataState;
    
}
